var status = 0;
var L 
var H 



//----------------------------------------------------变量切割
function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (status == 0 && mode == 0) {
        cm.dispose();
        return;
    }
    if (mode == 1) {
        status++;
    } else {
        status--;
    }

    if (cm.getMapId() == 180000001) {
            cm.sendOk("很遗憾，您因为违反用户守则被禁止游戏活动，如有异议请联系管理员.");
            cm.dispose();
        } 
    else if (status == 0) {
		if (cm.getChar().isGM()==true){
		var selStr = "#e        点太快，容易掉线哦。 \r\n";
		   selStr +="#r#L0#开始抢楼#l\r\n";
        cm.sendSimple(selStr);
		}else{
			cm.dispose();
			cm.openNpc(9010049,"qianglou");
		}
    } else if (status == 1) {
        switch (selection) {
			case 0:
				cm.dispose();
				cm.openNpc(9010049,"qianglou");
				break;
		}
    }
}
